// Engine.h : Declaration of the CEngine

#ifndef __ENGINE_H_
#define __ENGINE_H_

#include "resource.h"       // main symbols
#include "ChmCompilerCP.h"

interface IIHost;
/////////////////////////////////////////////////////////////////////////////
// CEngine
class ATL_NO_VTABLE CEngine : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CEngine, &CLSID_Engine>,
	public IConnectionPointContainerImpl<CEngine>,
	public IDispatchImpl<IEngine, &IID_IEngine, &LIBID_CHMCOMPILERLib>,
	public CProxy_IEngineEvents< CEngine >
{
public:
	CEngine()
	{
		m_Host = NULL;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_ENGINE)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CEngine)
	COM_INTERFACE_ENTRY(IEngine)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(IConnectionPointContainer)
	COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
END_COM_MAP()
BEGIN_CONNECTION_POINT_MAP(CEngine)
CONNECTION_POINT_ENTRY(DIID__IEngineEvents)
END_CONNECTION_POINT_MAP()


// IEngine
public:
	VARIANT_BOOL Log(BSTR msg);
	VARIANT_BOOL Proc(BSTR msg);
	STDMETHOD(get_Host)(/*[out, retval]*/ IIHost* *pVal);
	STDMETHOD(putref_Host)(/*[in]*/ IIHost* newVal);
	IIHost * m_Host;
	STDMETHOD(CompileHHP)(BSTR FullPath, /*[out, retval]*/ VARIANT_BOOL * pRet);
};

#endif //__ENGINE_H_
